#![allow(unused_imports, non_snake_case, non_camel_case_types)]
use super::windows::*;
use super::*;

#[repr(C)]
pub struct IDWriteTextAnalysisSourceVtbl {
	pub parent: IUnknownVtbl,
	pub GetTextAtPosition: unsafe extern "system" fn(This: *mut IDWriteTextAnalysisSource, textPosition: UINT32, textString: *mut *const WCHAR, textLength: *mut UINT32) -> HRESULT,
	pub GetTextBeforePosition: unsafe extern "system" fn(This: *mut IDWriteTextAnalysisSource, textPosition: UINT32, textString: *mut *const WCHAR, textLength: *mut UINT32) -> HRESULT,
	pub GetParagraphReadingDirection: unsafe extern "system" fn(This: *mut IDWriteTextAnalysisSource) -> DWRITE_READING_DIRECTION,
	pub GetLocaleName: unsafe extern "system" fn(This: *mut IDWriteTextAnalysisSource, textPosition: UINT32, textLength: *mut UINT32, localeName: *mut *const WCHAR) -> HRESULT,
	pub GetNumberSubstitution: unsafe extern "system" fn(This: *mut IDWriteTextAnalysisSource, textPosition: UINT32, textLength: *mut UINT32, numberSubstitution: *mut *mut IDWriteNumberSubstitution) -> HRESULT,
}
#[repr(C)]
pub struct IDWriteTextAnalysisSource {
	pub lpVtbl: *const IDWriteTextAnalysisSourceVtbl,
}
impl IDWriteTextAnalysisSource {
	#[inline]
	pub unsafe fn GetTextAtPosition(&self, textPosition: UINT32, textString: *mut *const WCHAR, textLength: *mut UINT32) -> HRESULT {
		((*self.lpVtbl).GetTextAtPosition)(self as *const _ as *mut _, textPosition, textString, textLength)
	}
	#[inline]
	pub unsafe fn GetTextBeforePosition(&self, textPosition: UINT32, textString: *mut *const WCHAR, textLength: *mut UINT32) -> HRESULT {
		((*self.lpVtbl).GetTextBeforePosition)(self as *const _ as *mut _, textPosition, textString, textLength)
	}
	#[inline]
	pub unsafe fn GetParagraphReadingDirection(&self) -> DWRITE_READING_DIRECTION {
		((*self.lpVtbl).GetParagraphReadingDirection)(self as *const _ as *mut _)
	}
	#[inline]
	pub unsafe fn GetLocaleName(&self, textPosition: UINT32, textLength: *mut UINT32, localeName: *mut *const WCHAR) -> HRESULT {
		((*self.lpVtbl).GetLocaleName)(self as *const _ as *mut _, textPosition, textLength, localeName)
	}
	#[inline]
	pub unsafe fn GetNumberSubstitution(&self, textPosition: UINT32, textLength: *mut UINT32, numberSubstitution: *mut *mut IDWriteNumberSubstitution) -> HRESULT {
		((*self.lpVtbl).GetNumberSubstitution)(self as *const _ as *mut _, textPosition, textLength, numberSubstitution)
	}
}
impl core::ops::Deref for IDWriteTextAnalysisSource {
	type Target = IUnknown;
	#[inline]
	fn deref(&self) -> &IUnknown {
		unsafe { &*(self as *const IDWriteTextAnalysisSource as *const IUnknown) }
	}
}
impl Interface for IDWriteTextAnalysisSource {
	#[inline]
	fn uuidof() -> GUID {
		GUID { Data1: 0x688e1a58, Data2: 0x5094, Data3: 0x47c8, Data4: [0xad, 0xc8, 0xfb, 0xce, 0xa6, 0x0a, 0xe9, 0x2b] }
	}
}
